package cn.pn.project.mapper.schedule;

import cn.pn.project.pojo.schedule.Commoditysession;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * 商品场次时间表
 */
public interface CommoditysessionDao {

    /**
     * 根据场次时间id查询场地id
     * @param sessionIds 场次id，是多个，用逗号隔开
     * @return
     * @throws SQLException
     */
    public List<Commoditysession> getCommoditysessionBySessionId(@Param("sessionIds") String sessionIds) throws SQLException;


    /**
     * 根据场地id查询相关的场次信息
     * @param placeId
     * @return
     * @throws SQLException
     */
    public List<Commoditysession> getCommoditysessionByPlaceId(@Param("placeId") Integer placeId) throws SQLException;


    /**
     * 根据场地id和场次时间查询场次id
     * @param placeId 场地id
     * @param sessionTime 场次具体时间
     * @return
     * @throws SQLException
     */
    public Commoditysession getCommoditysessionByPlaceIdAndSessionTime(@Param("placeId")Integer placeId,@Param("sessionTime")String sessionTime ) throws SQLException;


    /**
     * 多条件查询场次集合（谢耀翔）
     * @param param
     * @return
     * @throws SQLException
     */
    public List<Commoditysession> getCommoditysessionListByMap(Map<String,Object> param) throws SQLException;

    /**
     * 多条件查询场次对象（谢耀翔）
     * @param param
     * @return
     * @throws Exception
     */
    public Commoditysession getCommoditysessionByMap(Map<String,Object> param)throws Exception;
}
